<?php

class IndexController extends GenesisController
{

    /**
     * Displays homepage.
     */
    public function indexAction()
    {
        $this->view->headScript()->appendFile('/js/jquery/jquery.json-2.2.js');
        $componentUsage = new Default_Model_ComponentUsage();
        $result=$componentUsage->getUsedComponentsInfo();
        $themes=array();
        foreach ($result as $res) {
            if ($res['theme_name'] != 'N/A')
                $themes[$res['theme_name']]=1;
        }
        foreach (array_keys($themes) as $theme) {
            $this->view->headLink()->appendStylesheet('/theme/get-theme/name/'.$theme);
        }
        $this->view->components=$result;
    }
   
    
}

